package com.hiof.heartrate;

import android.util.Log;
import com.hiof.servercommunication.receive.beans.GeoPoint;
import com.hiof.utility.Utility;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: manish
 * Date: 5/26/12
 * Time: 6:15 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class HeartRateManager {
    public abstract double getLatestHeartRate();

    public abstract HealthStatus getHealthStatus();

    public abstract void destroy();

    protected void onHearRateChanged(double heartRate) {
        //TODO: MoraService.saveHearRate(heartRate);
        HealthStatus status = getHealthStatus();
        if (status == HealthStatus.TOO_LOW) {
            //TODO: Send sms here
        } else if (status == HealthStatus.TOO_HIGH) {
            //TODO: send sms here
        }
        Utility.debug(HeartRateManager.class.getName(), "Heart rate: " + heartRate);
    }
}
